package com.lant.config;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.client.RestTemplate;

/**
 * @description: web工程配置
 * @projectName: lant-manager-web
 * @className: WebConfig
 * @author: YFL
 * @createTime: 2020年4月16日 下午6:47:22
 */
@MapperScan(value = "com.lant.dao")
@Configuration
@EnableEurekaClient
@EnableFeignClients
@PropertySource({"classpath:resource.properties"})
public class ServiceConfig {
    @Bean
    @LoadBalanced
    RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
